package com.czk.gulimall.search.feign;

import com.czk.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author:ChenZhangKun
 * @Date: 2022/1/28 16:18
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 根据attrId获取attr信息
     *
     * @param attrId
     * @return
     */
    @RequestMapping("/product/attr/info/{attrId}")
    R attrInfo(@PathVariable("attrId") Long attrId);

    @GetMapping("/product/brand/infos")
    R brandInfo(@RequestParam("brandIds") List<Long> brandIds);
}
